﻿<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="PurchaseSales.Manage" namespace="PurchaseSales.Manage.Model.Entities">
  <class name="AuthRoles" table="AuthRoles" lazy="true">
    <id name="RoleId" column="RoleId" type="Guid">
      <generator class="guid.comb" />
    </id>
    <property type="string" name="RoleName" column="[RoleName]"/>

    <bag name="Users" cascade="all" inverse="true">
      <key column="RoleId"/>
      <one-to-many class="Users"/>
    </bag>
    <bag name="AuthRoleFunctions" cascade="all" inverse="true" >
      <key column="RoleId"/>
      <one-to-many class="AuthRoleFunction"/>
    </bag>
  </class>
</hibernate-mapping>